<template>
  <div>
    <!-- 循环遍历数据 -->
    <div class="hjw-d" v-for="(item,index) in $store.state.addList" :key="index">
      <div>
        <!-- 复选框双向绑定 -->
        <el-checkbox v-model="item.hjwcheck" @change="hjwfx"></el-checkbox>
        {{item.username}}
      </div>
      <!-- 点击删除  -->
      <el-button type="danger" icon="el-icon-delete" circle @click="hjwdel(index)"></el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {};
  },
  mounted() {},
  methods: {
    
    hjwdel(index) {
      // 删除传到vuex中             索引
      this.$store.commit("hjwdel", index);
    },
    hjwfx(){
        this.$store.commit("hjwfx",this.qx);
    },
  },
  computed: {},
  components: {},
  watch: {},
  getters: {}
};
</script>

<style scoped>
.hjw-d {
  display: flex;
  justify-content: space-between;
}
</style>